#ifndef _GAME_SCREEN_H_
# define _GAME_SCREEN_H_

# include <SDL/SDL.h>
# include "Image.h"
# include "UIBoard.h"
# include "PushButton.h"
# include "CheckBox.h"
# include "IScreen.h"

enum
{
	INFOS_NONE = 0,
	INFOS_RULE_THREE,
	INFOS_WAITING,
	INFOS_AI,
	INFOS_COUNT
};

class GameScreen : public IScreen
{
protected:
	unsigned char m_lastColor;
	Image m_background;
	Image m_currentPlayer;
	Image m_cursor;
	Image m_capturedPieces[2];
	Image m_textInfos;
	Image m_infos[INFOS_COUNT];
	int m_currentInfos;
	SDL_Rect m_capturedPieceRects[2];
	UIBoard m_board;
	PushButton* m_buttonReset;
	PushButton* m_buttonQuit;
	PushButton* m_buttonBack;
	PushButton* m_buttonPrintBoard;
	CheckBox* m_checkBoxMovePieces;
	CheckBox* m_checkBoxRuleThree;
	CheckBox* m_checkBoxCanRemovePiece;
	bool m_isBlocked;

public:
	GameScreen();
	virtual ~GameScreen();

	virtual void init();
	virtual bool draw();
	virtual void doEvents();
	virtual void setBlockOnButtons(bool _block);
	virtual bool isBlocked() const;

private:
	GameScreen(GameScreen const&);
	GameScreen& operator=(GameScreen const&);

public:
	friend bool On_buttonReset_Pressed(IScreen* _screen);
	friend bool On_buttonQuit_Pressed(IScreen* _screen);
	friend bool On_buttonBack_Pressed(IScreen* _screen);
	friend bool On_buttonPrintBoard_Pressed(IScreen* _screen);
	friend bool On_checkBoxMovePieces_Checked(IScreen* _screen);
	friend bool On_checkBoxRuleThree_Checked(IScreen* _screen);
	friend bool On_checkBoxCanRemovePiece_Checked(IScreen* _screen);
};


#endif // _GAME_SCREEN_H_
